<?php

class mark_ctrl extends Controller
{

    public function __construct()
    {
        parent::__construct();
    }

    //修改mark
    public function save_mark()
    {
        if (!$this->ajax_err && $this->uid) {
            $mark = $_REQUEST["mark"];

            $_mdl = Loader::mdl("mark_mdl");
            $data = $_mdl->save_mark($this->uid, $this->nick, $mark);
            $this->ajax($data);
        } else {
            return $this->ajax('', array(1, '未登录', 1, '请登录'));
        }
    }

    //获取mark
    public function get_mark_list_day()
    {
        if (!$this->ajax_err && $this->uid) {

            $_mdl = Loader::mdl("mark_mdl");
            $data = $_mdl->get_mark_list_day();
            $this->ajax($data);
        } else {
            return $this->ajax('', array(1, '未登录', 1, '请登录'));
        }
    }

}